using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class DownloadEmojiRequest : GeneratedMessageLite<DownloadEmojiRequest, DownloadEmojiRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<DownloadEmojiRequest, DownloadEmojiRequest.Builder>
		{
			private bool resultIsReadOnly;
			private DownloadEmojiRequest result;
			protected override DownloadEmojiRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override DownloadEmojiRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override DownloadEmojiRequest DefaultInstanceForType
			{
				get
				{
					return DownloadEmojiRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public int EmojiItemCount
			{
				get
				{
					return this.result.EmojiItemCount;
				}
				set
				{
					this.SetEmojiItemCount(value);
				}
			}
			public IPopsicleList<EmojiDownloadInfoReq> EmojiItemList
			{
				get
				{
					return this.PrepareBuilder().emojiItem_;
				}
			}
			public Builder()
			{
				this.result = DownloadEmojiRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(DownloadEmojiRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private DownloadEmojiRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					DownloadEmojiRequest other = this.result;
					this.result = new DownloadEmojiRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override DownloadEmojiRequest.Builder Clear()
			{
				this.result = DownloadEmojiRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override DownloadEmojiRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new DownloadEmojiRequest.Builder(this.result);
				}
				return new DownloadEmojiRequest.Builder().MergeFrom(this.result);
			}
			public override DownloadEmojiRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override DownloadEmojiRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is DownloadEmojiRequest)
				{
					return this.MergeFrom((DownloadEmojiRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override DownloadEmojiRequest.Builder MergeFrom(DownloadEmojiRequest other)
			{
				return this;
			}
			public override DownloadEmojiRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override DownloadEmojiRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(DownloadEmojiRequest._downloadEmojiRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = DownloadEmojiRequest._downloadEmojiRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasEmojiItemCount = input.ReadInt32(ref this.result.emojiItemCount_);
							continue;
						}
						if (num3 == 26u)
						{
							input.ReadMessageArray<EmojiDownloadInfoReq>(num, text, this.result.emojiItem_, EmojiDownloadInfoReq.DefaultInstance, extensionRegistry);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public DownloadEmojiRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public DownloadEmojiRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public DownloadEmojiRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public DownloadEmojiRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public DownloadEmojiRequest.Builder SetEmojiItemCount(int value)
			{
				this.PrepareBuilder();
				this.result.hasEmojiItemCount = true;
				this.result.emojiItemCount_ = value;
				return this;
			}
			public DownloadEmojiRequest.Builder ClearEmojiItemCount()
			{
				this.PrepareBuilder();
				this.result.hasEmojiItemCount = false;
				this.result.emojiItemCount_ = 0;
				return this;
			}
			public EmojiDownloadInfoReq GetEmojiItem(int index)
			{
				return this.result.GetEmojiItem(index);
			}
			public DownloadEmojiRequest.Builder SetEmojiItem(int index, EmojiDownloadInfoReq value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.emojiItem_[index] = value;
				return this;
			}
			public DownloadEmojiRequest.Builder SetEmojiItem(int index, EmojiDownloadInfoReq.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.emojiItem_[index] = builderForValue.Build();
				return this;
			}
			public DownloadEmojiRequest.Builder AddEmojiItem(EmojiDownloadInfoReq value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.emojiItem_.Add(value);
				return this;
			}
			public DownloadEmojiRequest.Builder AddEmojiItem(EmojiDownloadInfoReq.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.emojiItem_.Add(builderForValue.Build());
				return this;
			}
			public DownloadEmojiRequest.Builder AddRangeEmojiItem(IEnumerable<EmojiDownloadInfoReq> values)
			{
				this.PrepareBuilder();
				this.result.emojiItem_.Add(values);
				return this;
			}
			public DownloadEmojiRequest.Builder ClearEmojiItem()
			{
				this.PrepareBuilder();
				this.result.emojiItem_.Clear();
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int EmojiItemCountFieldNumber = 2;
		public const int EmojiItemFieldNumber = 3;
		private static readonly DownloadEmojiRequest defaultInstance;
		private static readonly string[] _downloadEmojiRequestFieldNames;
		private static readonly uint[] _downloadEmojiRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasEmojiItemCount;
		private int emojiItemCount_;
		private PopsicleList<EmojiDownloadInfoReq> emojiItem_ = new PopsicleList<EmojiDownloadInfoReq>();
		private int memoizedSerializedSize = -1;
		public static DownloadEmojiRequest DefaultInstance
		{
			get
			{
				return DownloadEmojiRequest.defaultInstance;
			}
		}
		public override DownloadEmojiRequest DefaultInstanceForType
		{
			get
			{
				return DownloadEmojiRequest.DefaultInstance;
			}
		}
		protected override DownloadEmojiRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public int EmojiItemCount
		{
			get
			{
				return this.emojiItemCount_;
			}
		}
		public IList<EmojiDownloadInfoReq> EmojiItemList
		{
			get
			{
				return this.emojiItem_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				if (!this.hasBaseRequest)
				{
					return false;
				}
				if (!this.hasEmojiItemCount)
				{
					return false;
				}
				if (!this.BaseRequest.IsInitialized)
				{
					return false;
				}
				bool result;
				using (IEnumerator<EmojiDownloadInfoReq> enumerator = this.EmojiItemList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						EmojiDownloadInfoReq current = enumerator.get_Current();
						if (!current.IsInitialized)
						{
							result = false;
							return result;
						}
					}
					return true;
				}
				return result;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasEmojiItemCount)
				{
					num += CodedOutputStream.ComputeInt32Size(2, this.EmojiItemCount);
				}
				using (IEnumerator<EmojiDownloadInfoReq> enumerator = this.EmojiItemList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						EmojiDownloadInfoReq current = enumerator.get_Current();
						num += CodedOutputStream.ComputeMessageSize(3, current);
					}
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private DownloadEmojiRequest()
		{
		}
		public EmojiDownloadInfoReq GetEmojiItem(int index)
		{
			return this.emojiItem_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] downloadEmojiRequestFieldNames = DownloadEmojiRequest._downloadEmojiRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, downloadEmojiRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasEmojiItemCount)
			{
				output.WriteInt32(2, downloadEmojiRequestFieldNames[2], this.EmojiItemCount);
			}
			if (this.emojiItem_.Count > 0)
			{
				output.WriteMessageArray<EmojiDownloadInfoReq>(3, downloadEmojiRequestFieldNames[1], this.emojiItem_);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasEmojiItemCount)
			{
				num ^= this.emojiItemCount_.GetHashCode();
			}
			using (IEnumerator<EmojiDownloadInfoReq> enumerator = this.emojiItem_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					EmojiDownloadInfoReq current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			DownloadEmojiRequest downloadEmojiRequest = object_0 as DownloadEmojiRequest;
			if (downloadEmojiRequest == null)
			{
				return false;
			}
			if (this.hasBaseRequest != downloadEmojiRequest.hasBaseRequest || (this.hasBaseRequest && !this.baseRequest_.Equals(downloadEmojiRequest.baseRequest_)))
			{
				return false;
			}
			if (this.hasEmojiItemCount != downloadEmojiRequest.hasEmojiItemCount || (this.hasEmojiItemCount && !this.emojiItemCount_.Equals(downloadEmojiRequest.emojiItemCount_)))
			{
				return false;
			}
			if (this.emojiItem_.Count != downloadEmojiRequest.emojiItem_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.emojiItem_.Count; i++)
			{
				if (!this.emojiItem_[i].Equals(downloadEmojiRequest.emojiItem_[i]))
				{
					return false;
				}
			}
			return true;
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<DownloadEmojiRequest, DownloadEmojiRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<DownloadEmojiRequest, DownloadEmojiRequest.Builder>.PrintField("EmojiItemCount", this.hasEmojiItemCount, this.emojiItemCount_, writer);
			GeneratedMessageLite<DownloadEmojiRequest, DownloadEmojiRequest.Builder>.PrintField<EmojiDownloadInfoReq>("EmojiItem", this.emojiItem_, writer);
		}
		public static DownloadEmojiRequest ParseFrom(byte[] data)
		{
			return DownloadEmojiRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private DownloadEmojiRequest MakeReadOnly()
		{
			this.emojiItem_.MakeReadOnly();
			return this;
		}
		public static DownloadEmojiRequest.Builder CreateBuilder()
		{
			return new DownloadEmojiRequest.Builder();
		}
		public override DownloadEmojiRequest.Builder ToBuilder()
		{
			return DownloadEmojiRequest.CreateBuilder(this);
		}
		public override DownloadEmojiRequest.Builder CreateBuilderForType()
		{
			return new DownloadEmojiRequest.Builder();
		}
		public static DownloadEmojiRequest.Builder CreateBuilder(DownloadEmojiRequest prototype)
		{
			return new DownloadEmojiRequest.Builder(prototype);
		}
		static DownloadEmojiRequest()
		{
			DownloadEmojiRequest.defaultInstance = new DownloadEmojiRequest().MakeReadOnly();
			DownloadEmojiRequest._downloadEmojiRequestFieldNames = new string[]
			{
				"BaseRequest",
				"EmojiItem",
				"EmojiItemCount"
			};
			DownloadEmojiRequest._downloadEmojiRequestFieldTags = new uint[]
			{
				10u,
				26u,
				16u
			};
			object.ReferenceEquals(micromsg.Proto.DownloadEmojiRequest.Descriptor, null);
		}
	}
}
